<template>
  <div>
    <p>
      每次+1：<button @click="increMent">+</button>
      数字：{{ add }}
    </p>
    <p>
      每次+1：<button @click="reduction">-</button>
      数字：{{ reduce }}
    </p>
  </div>
</template>

<script setup>
import {userStore} from './stone'
import {storeToRefs} from 'pinia'

const store =userStore()
const {add,reduce} = storeToRefs(store)
const increMent= () =>{
  store.increase()
}
const reduction= () =>{
  store.decrease()
}
</script>

<style scoped>
button{
  background-color:aquamarine ;
}
</style>